<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.tjsinfo.tjsoa.vote.vo.TVoteOpinionBox"%>
<%@page import="java.text.SimpleDateFormat;"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");	
	TVoteOpinionBox tvob = (TVoteOpinionBox) request.getAttribute("tvob");
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>粮油集团办公自动化协作平台</title>
		<link href="<%=basePath%>style/txlz7.css" rel="stylesheet" type="text/css" />
		<link href="<%=basePath%>ajaxFramework/ext-2.1/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="<%=basePath%>ajaxFramework/ext-2.1/adapter/ext/ext-base.js"></script>
		<script type="text/javascript" src="<%=basePath%>ajaxFramework/ext-2.1/ext-all.js"></script>
		<script type="text/javascript" src="<%=basePath%>ajaxFramework/ext-2.1/source/locale/ext-lang-zh_CN.js"></script>
		<script type="text/javascript" src="<%=basePath%>ajaxFramework/jQuery/jquery.js"></script>
		<script type="text/javascript" src="<%=basePath%>js/common/global/validator.js"></script>
		<script type="text/javascript" src="<%=basePath%>js/common/global/pageControl.js"></script>
		<script type="text/javascript" src="<%=basePath %>js/common/system/selectuserradio.js"></script>
	 	<style type="text/css">
			.x-grid3-row-radioBtn{
			   width:100%;
			    height:18px;
			    background-position:2px 2px;
			    background-repeat:no-repeat;
			    background-color:transparent;
	        	background-image:url(<%=basePath %>ajaxFramework/ext-2.1/resources/images/default/grid/row-radio-sprite.gif);
	        }
		</style>		
		<script type="text/javascript">
			$(function(){
				$.ajaxSetup({
				  async: false
				  }); 
				$(".s09 >a").attr("href","javascript:formSubmit()");
				$(".s10 >a").attr("href","javascript:back()");
				$(".s12 >a").attr("href","javascript:del()");
			});
			
			function back(){
				window.location.href="<%=basePath%>vote/opinionBox/opinionBoxSelfList.jsp";
			}			
			
			function formSubmit(){
				if(isnull("input[name='title']","标题不得为空！")&&isnull("textarea[name='contact']","内容不得为空！"))
				{
					msg();
					form1.submit();
				}	
			}
			function del(){
                Ext.MessageBox.confirm("提示信息","'是否删除 <%=tvob.getTitle()%> ?'",function(btn){
  		           if(btn == 'yes'){
                      window.location.href="<%=basePath%>tjsinfo/tjsoa/vote/opinionBoxDel.do?id=<%=tvob.getId()%>&list=self";
  		           }		           
                });	
			}				
	    </script>
	</head>

	<body>
		<form action="<%=basePath%>tjsinfo/tjsoa/vote/opinionBoxUpdate.do" method="post" name="form1">
		    <input type="hidden" id="id" name="id" value="<%=tvob.getId()%>" />
			<div style="height: 94%">
				<div id="right">
					<div class="p_01">
						<ul>
							<li class="s09">
								<a href="#">提交</a>
							</li>
							<li class="s12">
								<a href="#">删除</a>
							</li>
							<li class="s10">
								<a href="#">返回</a>
							</li>
						</ul>
					</div>
					<table width="100%" border="0" cellspacing="0" cellpadding="0" height="96%">
						<tr>
							<td valign="top" height="100%">
								<div class="contabwd01">
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="90%">
												<table width="95%" border="0" cellspacing="0" cellpadding="0" align="left" style="margin-top: 10px; margin-left: 20px">
													<tr>
														<td>
															<table width="98%" border="0" cellspacing="0"
																cellpadding="0" class="jkdfont">
																<tr>
																	<td align="center" style="font-size: 16px" colspan="3">
																		意 见 箱 修 改 
																	</td>
																</tr>
															</table>
														</td>
													</tr>
												</table>
											</td>
										</tr>
										<tr>
											<td width="90%">
												<table border="0" cellspacing="0" cellpadding="0" align="left" style="margin-top: 10px; margin-left: 25px">
													<tr>
														<td>
															<table width="785" border="0" align="left" cellpadding="0" cellspacing="0" class="ttaabb">
																<tr>
																	<td width="30%" align="right">
																		<img src="<%=basePath%>images/dfdf_03.gif"/>&nbsp;匿名
																	</td>
																	<td colspan="2">
																		<select name="anonymity" id="anonymity">
																			<option value="1" <%if(tvob.getAnonymity()!=null && tvob.getAnonymity().equals(1))out.println(" selected='selected'"); %>>
																				是
																			</option>
																			<option value="0" <%if(tvob.getAnonymity()!=null && tvob.getAnonymity().equals(0))out.println(" selected='selected'"); %>>
																				否
																			</option>
																		</select>
																	</td>
																</tr>
																<tr>
																	<td align="right">
																		<img src="<%=basePath%>images/dfdf_03.gif" />&nbsp;标题
																	</td>
																	<td colspan="2">
																		<input name="title" type="text" id="title" size="94" value="<%=tvob.getTitle()%>"/>
																	</td>
																</tr>
																<tr>
																	<td align="right">
																		<img src="<%=basePath%>images/dfdf_03.gif" />&nbsp;时间
																	</td>
																	<td colspan="2">
																		<input name="datetime" type="text" id="datetime" size="94" value="<%=sdf.format(tvob.getDateTime())%>" readonly="readonly"/>
																	</td>
																</tr>
																<tr>
																	<td align="right">
																		<img src="<%=basePath%>images/dfdf_03.gif" />&nbsp;内容
																	</td>
																	<td colspan="2">
																		<textarea cols="69" rows="20" id="contact" name="contact"><%=tvob.getContact()%></textarea>
																	</td>
																</tr>																
															</table>
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</div>
							</td>
						</tr>
					</table>
				</div>
			</div>
			<input type="hidden" id="basePath" value="<%=basePath%>" />
		</form>
	</body>
</html>
